Use mysql:8.0-debian image tag for CI #175
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
mysql:8-debian
tag is deprecated and is no longer receiving updates. The recommendation is to use the more explicitmysql:8.0-debian
tag. This was discovered during (and extracted from) my work in #174.This is the reference to the discovery:
docker-library/mysql#1040 (comment)
Important
Landing this means that we'll also need to change the required checks for this repo since the name is now
8.0
instead of8
.Breakdown of changes
This wasn't a simple "let's change
8
to8.0
"...The newer implementation of mysql's entrypoint file does this thing where it checks to see if the data directory already exists. If it does, then the setup does nothing.
https://github.com/docker-library/mysql/blob/db3fdfbab4caa033f02126f525cb6dfb5a3c1b0c/docker-entrypoint.sh#L380-L381
This means that we can no longer mount a shared directory at
/var/lib/mysql
otherwise the entrypoint script will not initialize the database. The purpose of this shared mount between thedb
and theapp
services was so that theapp
has access to the certificate files that we generate within thedb
container.My workaround for this was to mount the directory somewhere else (
/mysql-certs
) and then change ourgenerate_keys.sh
script to copy the generated certificates from/var/lib/mysql
to/mysql-certs
. Sincegenerate_keys.sh
is executed as themysql
user, instead ofroot
, we have to do a docker trick where we ensure that the directory to be mounted is pre-created andchmod
-ed with777
before it's mounted.